clear all,clc,close all;

Rorb=191e+5;
Rl=6371e+3;
w=(2*pi)/(12*3600);
T=60;
tmax=12*3600;
t=0:T:tmax;
N=length(t);
Rr=[0;Rl];
f0=1602e+6;
c=3e+8;

for k=1:N;
Rsat=Rl+Rorb;   
Rsv=[Rsat*cos(w*t(k));Rsat*sin(w*t(k))];
Rsvmas(:,k)=Rsv;
Rv=Rsv-Rr;
Rvmas(:,k)=Rv;
if k>2
Vsu(:,k)=(Rvmas(:,k)-Rvmas(:,k-1))/T;
Uv(:,k)=dot(Vsu(:,k),Rvmas(:,k))/norm(Rvmas(:,k));
fd(:,k)=(f0*Uv(:,k))/c;

end;
end;

figure(3);
plot(t,fd);


figure(1);
plot(Rsvmas(1,:),Rsvmas(2,:));

figure(2);
plot(Rvmas(1,:),Rvmas(2,:));
